<template>
<uni-shadow-root class="partials-coupons-simpleCoupons"><template name="simpleCoupons">
<block v-if="relateBean.length!=0">
 <scroll-view class="recommend_scroll_x_box" scroll-x="true">
 <block v-for="(item,index) in (relateBean)" :key="item.index">
      <view class="recommend_hot_box" :style="'background-color:'+(color[index])+';'" @click="click" :data-id="item.id" :data-index="index">
        <view class="CouponsText">
          <view class="name"><text>{{item.name}}</text></view>
          <view class="youhuiAmount"><text>￥{{item.youhuiAmount}}</text></view>
          <view class="remark"><text>{{item.remark}}</text></view>
        </view>
        <view class="CouponsImg" :style="'background-color:'+(color[index])+';'"></view>
        <view class="choose" v-if="color[index]!='#FE3D53'">
            <image src="https://image1.sansancloud.com/xianhua/2019_12/17/13/40/51_347.jpg?x-oss-process=style/preview_120" class="recommend_hot_image"></image>
        </view>
      </view>
       <view class="recommend_hot_box" :style="'background-color:'+(color[0])+';'" @click="clickLink" v-if="index==relateBean.length-1">
        <view class="moreCouponsText">
          <view class="youhuiAmount1"><text>更多好卷 </text></view>
        </view>
        <view class="CouponsImg" style="background-color:#FE3D53;"></view>
      </view>
     </block> 
    </scroll-view>
</block>
<block v-if="relateBean.length==0">
    <view class="noproduct">
      <image mode="widthFix" src="https://image1.sansancloud.com/xianhua/2019_12/16/15/54/55_950.jpg?x-oss-process=style/preview_120"></image>
      <text>没有相关的优惠卷</text>
    </view>
</block>
</template></uni-shadow-root>
</template>

<script>

global['__wxRoute'] = 'partials/coupons/simpleCoupons'

Component({})

export default global['__wxComponents']['partials/coupons/simpleCoupons']
</script>
<style platform="mp-weixin">

</style>